The present application is related to co-pending application U.S. Pat. No. 5,892,692, entitled "Method of Generating a Lookup Table for a Digital Oscillator", which was filed concurrently herewith.
The present invention relates in general to a digital oscillator for generating a sampled digital signal at a predetermined frequency, and more specifically, to a digital oscillator generating sinewaves using a lookup table.
Many types of digital signal processing equipment need to generate various signal waveforms during operation. For example, music synthesizers generate variously shaped waveforms at various frequencies. Radio receivers generate injection signals at predetermined frequencies for mixing with information signals to perform frequency translations.
Various techniques have been developed for generating digital waveforms. The technique used in any particular application depends upon the signal quality needed, whether a fixed or variable frequency signal is needed, signal processing capabilities available, desired component cost, and other factors. Use of a mathematical formula to generate sample values of a digital waveform provides high accuracy representation of the signal but requires higher processing capability and results in higher costs. In applications where only a fixed frequency or a limited number of frequencies are needed, a lookup table storing actual signal samples can be employed as a lower cost solution. Variable frequencies can be obtained using interpolation between samples in a lookup table, but noise and distortion are added and more signal processing capability must be provided.
Applications which only require a fixed frequency can generate a digitally sampled signal without noise or distortion, but only at integer multiples of a fundamental table frequency. Distortion is avoided since the needed sample values are all contained within the table and no interpolation between values is necessary. One example of an application needing only a fixed frequency is in generating a mixing signal used in a radio receiver to frequency shift a modulated signal, such as an intermediate frequency signal in a superheterodyne receiver.
The fundamental table frequency corresponds to the lowest frequency that can be generated from the table and is equal to the sample rate at which the digital signal is produced divided by the number of samples for one cycle of the stored waveform in the table. To generate the lowest frequency available, the table address is stepped one address at a time with the address looping back to zero at the end of the table so that the table output is a steam of values representing the waveform. To generate twice the frequency, the address step size is set to two so that only half the samples are used. Higher integer multiples of the fundamental table frequency are obtained using larger address step sizes (but only up to the point where the frequency generated is half the sample frequency). In order to obtain variable step sizes, the oscillator must use an adder in order to generate successive table addresses for producing an oscillator output signal. This results in added complexity and cost over a simple counter which can be used when only using a step size of one.
The step size between consecutive samples in the table corresponds to a phase increment .DELTA.. In order to produce a periodic signal at a desired frequency without distortion and without sample correction or interpolation in prior art digital oscillators, .DELTA. must divide evenly into one cycle of the waveform as stored in the table. In other words, phase coherence must be maintained when wrapping around from the end of the table back to the beginning of the table. Thus, at a given sample rate f.sub.s, only a limited number of frequencies can be produced without distortion since the phase increment .DELTA. inherent in the table must evenly divide into one cycle of the waveform (usually a sinewave). By reducing the phase increment .DELTA.(i.e., by increasing the sample rate of the table), it is possible to increase the number of frequencies which can be generated. However, substantially increasing the sample rate adds substantial cost to the processor.
Alternatively, it would be possible to vary the sample rate during operation in order to facilitate use of a lookup table to generate the periodic signals over a range of frequencies, but the sample rate must normally remain fixed during system operation.